package com.joysuch.wwyt.workflow.enums;

import java.util.*;

/**
 * 描述：工作流进程枚举<br>
 *
 * @author jingwk<br>
 * @version 1.0 <br>
 * 日期:2021年04月01日 上午10:57:00
 */
public enum WorkFlowProcessEnum {

    TO_DO_TASK("TD", "待办"),
    PROCESSED("PC", "已办"),
    PROPOSER("PR", "我发起的"),
    COMPLETED("CP", "已完成"),
    DRAFT("DR","草稿"),
    ALL("ALL", "全部");

    private String value;

    private String desc;

    WorkFlowProcessEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public final String getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    private static final Map<String, WorkFlowProcessEnum> lookup = new HashMap<>();

    static {
        for (WorkFlowProcessEnum e : EnumSet.allOf(WorkFlowProcessEnum.class)) {
            lookup.put(e.value, e);
        }
    }

    public static WorkFlowProcessEnum find(String value) {
        return lookup.get(value);
    }
}
